﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;

namespace Ewts.BaseData
{
    public partial class CustmoerShow : System.Web.UI.Page
    {
        public string strid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    strid = Request.Params["id"];
                    int id = (Convert.ToInt32(strid));
                    ShowInfo(id);
                }
            }
        }

        private void ShowInfo(int id)
        {
            DataLib.BLL.Cumtomer bll = new DataLib.BLL.Cumtomer();
            DataLib.Model.Cumtomer model = bll.GetModel(id);
            this.lblid.Text = model.id.ToString();
            this.lblcompanyname.Text = model.companyname;
            this.lblcustomercode.Text = model.customercode;
            this.lblcity.Text = model.city;
            this.lblsettlement.Text = model.settlement;
            this.lblpostcode.Text = model.postcode;
            this.lbllinkman.Text = model.linkman;
            this.lbllinkman2.Text = model.linkman2;
            this.lblphone.Text = model.phone;
            this.lblphone2.Text = model.phone2;
            this.lblEmail.Text = model.Email;
            this.lblEmail2.Text = model.Email2;
            this.lblBankName.Text = model.BankName;
            this.lblBankAccount.Text = model.BankAccount;
            this.lblBankCode.Text = model.BankCode;
            this.lblPutOnRecord.Text = model.PutOnRecord;
            this.lblBankAddress.Text = model.BankAddress;

        }
    }
}
